package com.yuhongwei.javaproject;

import com.alibaba.fastjson.JSONObject;
import com.yuhongwei.javaproject.address.Address;
import com.yuhongwei.javaproject.bean.HotVideo;
import com.yuhongwei.javaproject.bean.HotVideoCommon;
import com.yuhongwei.javaproject.net.HttpUtils;
import com.yuhongwei.javaproject.service.HotVideoService;

import javax.xml.ws.Service;
import java.security.KeyPair;
import java.util.List;
import java.util.Scanner;

/**
 * @author: jiangjiwei
 * @email: jiangjiwei@3452788854qq.com
 * @desc:
 * @datetime: 2021/12/22 21:31
 */
public class Main {
    public static void main(String[] args) {
       Main test = new Main();
       test.run();
    }
    public void run(){
        System.out.println("=======Java期末大作业功能系统========");
        System.out.println("本系统实现了以下功能");
        Scanner scanner = new Scanner(System.in);
        while (true){
            menu();
        }

    }
    public void menu(){
        System.out.println("1.热门视频数据 2.比特币客户端通信 3.比特币地址生成 0.退出");
        System.out.println("请输入你的选择");
        Scanner scanner = new Scanner(System.in);
        String user_input = scanner.next();
        int num = Integer.parseInt(user_input);
        switch (num){
            case 1:
                HotVideoService service = new HotVideoService();
                service.getHotVideo();
                break;
            case 2:
                // 二级菜单
                break;
            case 3:
                Address address = new Address();
              KeyPair keyPair = address.generateKye();
              String adrStr = address.newAdderss(keyPair);
              System.out.println("新地址是: "+adrStr);
                break;
            default:
                System.out.println("输入有误，不支持该功能，请重试");
        }
    }
}
